<template>
  <div class="count_api">
    <div>{{ count }}</div>
    <div>{{ doubleCount }}</div>
    <button @click="increment">+1</button>
    <button @click="decrement">-1</button>
  </div>
</template>
<script>
import CustomCount from '../hooks/countApi'
import userTitle from '../hooks/useTitle'
export default {
  setup () {
    const { count, doubleCount, increment, decrement } = CustomCount()
    const titleRef = userTitle('coderwhy')
    setTimeout(() => {
      titleRef.value = 'kobe'
    }, 3000)
    return {
      count,
      doubleCount,
      increment,
      decrement
    }
  }
}
</script>
<style scoped>
</style>
